package com.lgx.mall.business.entity;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.TableGenerator;

import com.lgx.common.entity.IdGenerator;
import com.lgx.right.entity.User;

/**
 * 会员记录
 * 
 * @author acer
 *
 */
@Entity
@Table(name="TM_MEMBERRECORDS")
public class MemberRecords implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -202527277966217351L;

	@Id
	@GeneratedValue(strategy=GenerationType.TABLE,generator=IdGenerator.MEMBERRECORD_ID_GENERATOR)
	@TableGenerator(
			name = IdGenerator.MEMBERRECORD_ID_GENERATOR,
			table = IdGenerator.GENERATOR_TABLE,
			pkColumnName = IdGenerator.GEN_NAME,
			pkColumnValue = IdGenerator.MEMBERRECORD_ID_GENERATOR,
			valueColumnName = IdGenerator.GEN_VALUE,
			initialValue = 1,
			allocationSize = 1
	)
	private long id;
	
	private Date recordDate;
	
	@ManyToOne
	@JoinColumn(name = "recorder_id")
	private User recorder;
	
	private Double score;
	
	private String note;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Date getRecordDate() {
		return recordDate;
	}

	public void setRecordDate(Date recordDate) {
		this.recordDate = recordDate;
	}

	public User getRecorder() {
		return recorder;
	}

	public void setRecorder(User recorder) {
		this.recorder = recorder;
	}

	public Double getScore() {
		return score;
	}

	public void setScore(Double score) {
		this.score = score;
	}

	public String getNote() {
		return note;
	}

	public void setNote(String note) {
		this.note = note;
	}
}
